|
|
Thorsten Froehlich wrote:
> No, it is most likely just the shell that is broken (given the source of
> the
> shells in most free Unix distributions, this is hardly surprising).
>
First of all, this is simply wrong, see below.
But even in case it were true, it seems to me that this does not match
the problem because the configure script is being interpreted by a shell.
> Try
> something like
>
> #include <stdlib.h>
> #include <stdio.h>
> int main(int ac, char **av)
> {
> printf("Result: %d\n", system(av[1]));
> return 0;
> }
>
Okay, and if you read the man page you knew the exit code of system()
is that of wait(2) or waitpid(2) which is a plain integer storing the
exit code in the least significant byte accessible using
WEXITSTATUS(status).
And the other bytes store things like the signal which killed the program.
I just verified that the code presented by you above will NOT work as you
expect on:
Darwin-PPC (MacOS-X)
Linux-ix86
FreeBSD-ix86
NetBSD-ix86
Solaris-5.9-ix86
(Nicolas: maybe I could run some checks for you on these boxes.
I forgot that in my previous answer; but I doubt I can test cross-compiling
using these.)
All these systems (and probably most other UNICes) behave in the way I
described.
> This should work and demonstrate that the system works correctly and only
> the shell is broken. Then file a bug report at the appropriate place.
>
OOPS... You'd better test yourself before posting :p
Wolfgang
Post a reply to this message
|
|